<template>
  <div class="Detail_iteminfo">
    <div>{{itemInfo.title}}</div>
    <span class="price">{{itemInfo.price}}</span>
    <span class="oldprice">{{itemInfo.oldPrice}}</span>
    <div class="discount">{{itemInfo.discountDesc}}</div>
    <div class="columns">
      <span v-for="item in itemInfo.columns" :key="item">{{item}}</span>
    </div>
    <div class="bottom_desc">
      <span>退货补运费</span>
      <span>全国包邮</span>
      <span>七天无理由退货</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailItemInfo",
  props: {
    itemInfo: {
      type: Object,
      default(){
        return {};
      }
    }
  }
}
</script>

<style scoped>
  .Detail_iteminfo{
    margin-top: 10px;    
  }

  .Detail_iteminfo div:nth-child(1){
    color: black;
    margin: 5px 10px;
    font-size: 15px;
  }

  .price{
    color: deeppink;
    font-size: 23px;
    margin: 5px 20px;
  }

  .oldprice{
    font-size: 13px;
    font-weight: 100;
    text-decoration: line-through;
  }

  .discount{
    display: inline-block;
    font-size: 12px;
    background-color: red;
    color: white;
    margin-left: 20px;
    padding: 3px;
    border-radius: 5px;
  }
  .columns{
    display: flex;
    justify-content: space-between;
    text-align: center;
    font-size: 13px;
    margin: 10px 0px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f6f6f6;
    font-weight: 200;
  }

  .columns span{
    flex:1
  }

  .bottom_desc{
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    margin: 15px 0px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f6f6f6;
  }

  .bottom_desc span{
    flex: 1
  }
  
</style>